﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace MixScript.BLL.Accounting
{
    public class GlobalFunction
    {
        public GlobalFunction()
        { }

        public void ShowNoResultFound(DataTable source, GridView gv)
        {
            source.Rows.Add(source.NewRow());
            gv.DataSource = source;
            gv.DataBind();
            int columnsCount = gv.Columns.Count;
            gv.Rows[0].Cells.Clear();
            gv.Rows[0].Cells.Add(new TableCell());
            gv.Rows[0].Cells[0].ColumnSpan = columnsCount;

        }
        public DataTable InizializeColumn()
        {
            DataTable dt = new DataTable();
            dt.Columns.Add("No");
            dt.Columns.Add("Acctnum");
            dt.Columns.Add("desc");
            dt.Columns.Add("Currency");
            dt.Columns.Add("Rate");
            dt.Columns.Add("Amount");
            dt.Columns.Add("Debit");
            dt.Columns.Add("Credit");
            dt.Columns.Add("Process");
            dt.Columns.Add("subsidiary");
            dt.Columns.Add("Invoice");
            dt.Columns.Add("sub_Date");
            dt.Columns.Add("sub_Terms");
            dt.Columns.Add("poinvoiceno");
            dt.Columns.Add("poinvoicedate");
            return dt;
        }
    }
}
